<?php /* Smarty version Smarty-3.0.8, created on 2011-08-26 21:27:44
         compiled from "./templates/tattoo/chat.tpl" */ ?>
<?php /*%%SmartyHeaderCode:18534896674e57f3b04b98b6-01079557%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '85f6eea32bcb098157bc1f0c44ea6481cb71438a' => 
    array (
      0 => './templates/tattoo/chat.tpl',
      1 => 1310330395,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '18534896674e57f3b04b98b6-01079557',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<div id="chat" name="chat">
	<h2>Chat</h2>
        <p>Trenutno je <?php echo $_smarty_tpl->getVariable('activeUsers')->value;?>
 članova on-line</p>
	<ul id="scrollbox">
            <?php  $_smarty_tpl->tpl_vars['shout'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('shoutbox')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['shout']->key => $_smarty_tpl->tpl_vars['shout']->value){
?>
		<li><span><a href="<?php echo $_smarty_tpl->getVariable('url')->value;?>
/?page=profil&clan_id=<?php echo $_smarty_tpl->tpl_vars['shout']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['shout']->value['name'];?>
</a> </span><?php echo $_smarty_tpl->tpl_vars['shout']->value['message'];?>
<div><?php echo $_smarty_tpl->tpl_vars['shout']->value['date'];?>
</div></li>
            <?php }} ?>
	</ul>
	<?php if ($_smarty_tpl->getVariable('userIsLogged')->value){?>
	<form action="handlers/chatinput.php?<?php echo $_smarty_tpl->getVariable('querystring')->value;?>
&redirectUrl=<?php echo $_smarty_tpl->getVariable('currentPage')->value;?>
" method="post">
		<textarea name="message" cols="" rows="2"></textarea>
		<input name="" type="submit" value="Pošalji" />
                <input name="username" type="hidden" value="<?php echo $_smarty_tpl->getVariable('user')->value['username'];?>
" />
	</form>
	<?php }else{ ?>
	<br />
	<h3>Morate biti ulogovani kako bi mogli da pošaljete poruku. Hvala.</h3>
	<br />
	<p><a class="red" href="#account_box">Prijavi se</a> | <a class="red" href="<?php echo $_smarty_tpl->getVariable('url')->value;?>
/?page=registracija">Registruj se</a></p>
	<?php }?>
</div>